class Contest < ActiveRecord::Base
  # For admins.
  has_many :managements, dependent: :destroy
  has_many :supervisers, through: :managements, class_name: 'User'

  # For students.
  has_many :enrollments, dependent: :destroy
  has_many :enrolled_users, through: :enrollments, class_name: 'User'

  has_many :products, dependent: :destroy
end
